<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>分类管理</title>
</head>
<body>
{extend name="extends/usercenter" /}
<div>
    {block name="left"}
    <h2>功能列表</h2>

    <li>
        <a href="{:url('index')}">
            分类列表
        </a>

    </li>
    <li>
        <a href="{:url('add',['group_id'=>input('group_id')])}">
            增加分类
        </a>
    </li>

    {/block}

    {block name="content"}



    <div>
        <a href="{:url('GroupAdmin/index')}"> 返回分组列表</a>

        <table class="table table-hover">
            <thead>
            <tr>
                <th> id</th>
                <th> Name</th>
                <th>父级id</th>
                <th>等级</th>
                <th>动作</th>

            </tr>
            </thead>
            <tbody>
            {volist name="cate" id="lv"}

                <tr>
                    <td>
                        {$lv->id}
                    </td>
                    <td>
                        {$lv->name}
                    </td>
                    <td>
                        {$lv.pid}
                    </td>
                    <td>
                        {$lv.lv}
                    </td>
                    <td>
                        <a href="{:url('CateAdmin/edit',['group_id'=>input('group_id'),'cate_id'=>$lv->id])}"
                           type="button"
                           class="btn btn-warning btn-sm">
                            编辑
                        </a>
                        <a href="{:url('CateAdmin/del',['group_id'=>input('group_id'),'cate_id'=>$lv->id])}"
                           type="button"
                           class="btn btn-danger btn-sm">
                            删除
                        </a>
                        <a href="{:url('ApiAdmin/index',['group_id'=>input('group_id'),'cate_id'=>$lv->id])}"
                                type="button"
                           class="btn btn-primary btn-sm">
                            接口列表
                        </a>

                    </td>
                </tr>
                {volist name="lv.sub" id="lv2"}
                    <tr>
                        <td>
                            {$lv2->id}
                        </td>
                        <td>
                         &nbsp;&nbsp;&nbsp; |--  {$lv2->name}
                        </td>
                        <td>
                            {$lv2.pid}
                        </td>
                        <td>
                            {$lv2.lv}
                        </td>
                        <td>
                            <a href="{:url('CateAdmin/edit',['group_id'=>input('group_id'),'cate_id'=>$lv2->id])}"
                               type="button"
                               class="btn btn-warning btn-sm">
                                编辑
                            </a>
                            <a href="{:url('CateAdmin/del',['group_id'=>input('group_id'),'cate_id'=>$lv2->id])}"
                               type="button"
                               class="btn btn-danger btn-sm">
                                删除
                            </a>

                            <a href="{:url('ApiAdmin/index',['group_id'=>input('group_id'),'cate_id'=>$lv2->id])}"
                               type="button"
                               class="btn btn-primary btn-sm">
                                接口列表
                            </a>

                        </td>
                    </tr>
                    {volist name="lv2.sub" id="lv3"}
                    <tr>
                        <td>
                            {$lv3->id}
                        </td>
                        <td>
                            &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; |--  {$lv3->name}
                        </td>
                        <td>
                            {$lv3.pid}
                        </td>
                        <td>
                            {$lv3.lv}
                        </td>
                        <td>
                            <a href="{:url('CateAdmin/edit',['group_id'=>input('group_id'),'cate_id'=>$lv3->id])}"
                               type="button"
                               class="btn btn-warning btn-sm">
                                编辑
                            </a>
                            <a href="{:url('CateAdmin/del',['group_id'=>input('group_id'),'cate_id'=>$lv3->id])}"
                               type="button"
                               class="btn btn-danger btn-sm">
                                删除
                            </a>
                            <a href="{:url('ApiAdmin/index',['group_id'=>input('group_id'),'cate_id'=>$lv3->id])}"
                               type="button"
                               class="btn btn-primary btn-sm">
                                接口列表
                            </a>

                        </td>
                    </tr>
                    {/volist}
                {/volist}


            {/volist}

            </tbody>

        </table>


    </div>



    {/block}
</div>
</body>
</html>
